package Models;

import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.Locale;

public class Allocation implements Serializable {
	private static final long serialVersionUID = 1L;
    
	private int allocationID;
    private Date allocationStartDate;
    private Date allocationModDate;
    private Date allocationDueDate;
    private int templateID;
    private boolean allocationFilled;
    private CustomerGroup custGroup;
    private List<ACT> acts;
    
	public int getAllocationID() {
		return allocationID;
	}
	public void setAllocationID(int allocationID) {
		this.allocationID = allocationID;
	}
	public Date getAllocationStartDate() {
		return allocationStartDate;
	}
	public void setAllocationStartDate(Date allocationStartDate) {
		this.allocationStartDate = allocationStartDate;
	}
	public Date getAllocationModDate() {
		return allocationModDate;
	}
	public void setAllocationModDate(Date allocationModDate) {
		this.allocationModDate = allocationModDate;
	}
	public Date getAllocationDueDate() {
		return allocationDueDate;
	}
	public void setAllocationDueDate(Date allocationDueDate) {
		this.allocationDueDate = allocationDueDate;
	}
	public int getTemplateID() {
		return templateID;
	}
	public void setTemplateID(int templateID) {
		this.templateID = templateID;
	}
	public boolean isAllocationFilled() {
		return allocationFilled;
	}
	public void setAllocationFilled(boolean allocationFilled) {
		this.allocationFilled = allocationFilled;
	}
	public CustomerGroup getCustGroup() {
		return custGroup;
	}
	public void setCustGroup(CustomerGroup custGroup) {
		this.custGroup = custGroup;
	}
	public List<ACT> getActs() {
		return acts;
	}
	public void setActs(List<ACT> acts) {
		this.acts = acts;
	}

    public String getTreeDescription(){
    	SimpleDateFormat dateFormat = new SimpleDateFormat("MM/dd/yyyy", Locale.US);
        return dateFormat.format(allocationDueDate) + ": " + this.custGroup.getDescription()
                + " - " + Integer.toString(this.allocationID);
    }
}
